﻿package com.gengine.core.frame
{

    public class FrameTimer extends BaseTimer
    {
        private var _isFrame60:Boolean = false;

        public function FrameTimer(param1:Number = 1, param2:Number = 2147483647, param3:Boolean = false)
        {
            this._isFrame60 = param3;
            super(param1, param2);
            return;
        }// end function

        override public function set running(param1:Boolean) : void
        {
            if (_running == param1)
            {
                return;
            }
            _running = param1;
            if (_running)
            {
                if (!this._isFrame60)
                {
                    FrameManager.flashFrame.addTimer(this);
                }
                else
                {
                    FrameManager.flashFrame.addTimer60(this);
                }
            }
            else if (!this._isFrame60)
            {
                FrameManager.flashFrame.removeTimer(this);
            }
            else
            {
                FrameManager.flashFrame.removeTimer60(this);
            }
            return;
        }// end function

    }
}
